﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <title>后台登陆</title>
    <meta charset="UTF-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" href="@Url.Content("~/content/admin/css/bootstrap.min.css")" />
		<link rel="stylesheet" href="@Url.Content("~/content/admin/css/bootstrap-responsive.min.css")" />
		<link rel="stylesheet" href="@Url.Content("~/content/admin/css/fullcalendar.css")" />	
		<link rel="stylesheet" href="@Url.Content("~/content/admin/css/unicorn.main.css")" />
		<link rel="stylesheet" href="@Url.Content("~/content/admin/css/unicorn.grey.css")" class="skin-color" />
        <link rel="stylesheet" href="@Url.Content("~/content/admin/css/select2.css")" />
        <link rel="stylesheet"  href="@Url.Content("~/content/admin/css/uniform.css")"/>
         <link rel="stylesheet" href="@Url.Content("~/content/admin/css/unicorn.login.css")" />

</head>
<body>
    <div id="logo">
            
        </div>
         <div id="loginbox">
               <form id="loginform" class="form-vertical">
                 
                          <div class="box corner-all">
                              <div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>									
								</span>
								<h5>用户登录</h5>
							</div>
                                <div class="box-body bg-white">
                                    <p> </p>
                                     <div class="control-group">
                                        <div class="controls">
                                            <div class="input-prepend">
                                           <span class="add-on"><i class="icon-user"></i></span><input type="text" name="UserName" placeholder="登录名" />
                                                </div>
                                        </div>
                                     </div>
                                    <div class="control-group">
                                      
                                        <div class="controls">
                                            <div class="input-prepend">
                                                <span class="add-on"><i class="icon-lock"></i></span><input type="password" name="txtPassword" placeholder="登录密码" />
                                                <input type="hidden" name="Code" value="@ViewData["code"]" />
                                                <input type="hidden" name="Url" value="@ViewData["url"]" />
                                            </div>
                                   
                                  </div>
                                            
                                        <div class="form-actions">
                                        <span class="pull-left"></span>
                                        <span class="pull-right"><input id="AdminLogin" name="AdminLogin" class="btn btn-inverse"  type="button" value="登陆" /></span>
                                    </div>
                                        
                                                 
                                    </div>
                            </div>
                      </div>
                      </form>
                  </div>


                <script src="@Url.Content("~/content/admin/js/jquery.min.js")"></script>  
                <script src="@Url.Content("~/content/admin/js/unicorn.login.js")"></script> 
        <script type="text/javascript">
            $(document).ready(function () {
                $("input[name='AdminLogin']").click(function () {
                    var clientUsername = $("input[name='UserName']").val();
                    var clientPassword = $("input[name='txtPassword']").val();
                    var clientCode = $("input[name='Code']").val();
                    var returnUrl = $("input[name='Url']").val();
                    $.post("/Admin/PostLogin/", { UserName: clientUsername, Password: clientPassword, Code: clientCode, Url: returnUrl }, function (dataBack) {
                        if (dataBack.Result == true) {
                            location.href = dataBack.Note2+"?" + dataBack.Note1;
                        }
                        else {
                            alert(dataBack.Messages);

                        }
                    });
                })
            })
        </script>
</body>

</html>
